CC      = $(CROSS_COMPILE)gcc -fPIC
LD      = $(CROSS_COMPILE)ld
AR      = $(CROSS_COMPILE)ar
NM      = $(CROSS_COMPILE)nm
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
READELF = $(CROSS_COMPILE)readelf

OBJS = qrng.o
SRC = qrng.c
CFLAGS += -Wall -I../ta/include -I$(TEEC_EXPORT)/usr/include -I./include
LDADD += -lteec -L$(TEEC_EXPORT)/usr/lib

BINARY = libqrng.a

.PHONY: all
all: $(BINARY)

$(OBJS): $(SRC)
	$(CC) -c $<

$(BINARY): $(OBJS) 
	$(AR) -crv $@ $<
.PHONY: clean
clean:
	rm -f $(OBJS) $(BINARY)